Before migrating any code to a 64-bit system, make sure that the transition is justified. Some 64-bit versions of Unix support both a 64-bit Application Binary Interface (ABI) as well as a 32-bit ABI for backward compatibility with existing applications. IRIX 6.0.1 is an example of an operating system that supports both 64-bit and 32-bit applications. Because Digital's Unix broke with the past, all applications must be compiled as 64-bit programs.
If you have the option of 32-bit compatibility, it may not be worthwhile to migrate existing code to 64-bit. Converting code to 64-bit makes sense if you plan on using huge files or a huge address space. Converting to 64-bit also makes sense if you can utilize efficient 64-bit integer types or other 64-bit processor features and performance that would be otherwise unavailable.
Keep in mind that there are also downsides to 64-bit programs that result from the increased program memory usage because many basic data types expand from 32-bit to 64-bit quantities. Also, you may need to test and support both a 32-bit and 64-bit version of your code when a single 32-bit version would work as well.
For most existing X applications, unless porting to 64-bit is required, using 32-bit compatibility is an appropriate option. For libraries, the choice of whether to support 64-bit is based on the needs of the library customers. Since a 64-bit application may require various libraries, providing 64-bit library implementations is generally a good idea even if not currently needed.